{% load debate_tags i18n %}

<div class="list-group-item d-inline-block">

  <a href="#rh{{ r.id }}" data-toggle="collapse" data-parent="#sidebar" aria-expanded="false"
     class="{% if round == r %}active{% endif %}">
    <i data-feather="circle" class="circle-icon
      {% if r.is_current %}circle-current
      {% elif r.completed %}circle-done
      {% else %}circle-later{% endif %}"></i>
    <span class="d-none d-md-inline">{{ r.abbreviation }}</span>
    <span class="d-md-none">{{ r.abbreviation|slice:":2" }}</span>
    <i data-feather="chevron-down" class="sidebar-expand d-none d-md-inline"></i>
    <i data-feather="chevron-up" class="sidebar-expand d-none d-md-inline"></i>
  </a>

  <div class="collapse {% if r == round and round_nav %}show{% endif %}" id="rh{{ r.id }}">

    <a href="{% roundurl 'availability-index' r %}" data-parent="#rh{{ r.id }}"
       class="list-group-item {% if availability_nav and round == r %}active{% endif %}">
      <i data-feather="circle" class="circle-icon
        {% if r.completed %} circle-done
        {% elif r.is_current and r.draw_status == r.STATUS_NONE %} circle-todo
        {% elif r.draw_status == r.STATUS_DRAFT %} circle-done
        {% elif r.draw_status == r.STATUS_CONFIRMED %} circle-done
        {% elif r.draw_status == r.STATUS_RELEASED %} circle-done
        {% else %} circle-later{% endif %}"></i>{% trans "Availability" %}
    </a>

    <a href="{% roundurl 'draw' r %}" data-parent="#rh{{ r.id }}"
       class="list-group-item {% if draw_nav and round == r %}active{% endif %}">
      <i data-feather="circle" class="circle-icon
        {% if r.completed %} circle-done
        {% elif r.draw_status == r.STATUS_NONE %} circle-later
        {% elif r.draw_status == r.STATUS_CONFIRMED %} circle-done
        {% elif r.draw_status == r.STATUS_RELEASED %} circle-done
        {% else %} circle-todo{% endif %}"></i>{% trans "Draw" %}
    </a>

    <a href="{% roundurl 'draw-display' r %}" data-parent="#rh{{ r.id }}"
      class="list-group-item {% if display_nav and round == r %}active{% endif %}">
      <i data-feather="circle" class="circle-icon
        {% if r.completed %} circle-done
        {% elif r.draw_status == r.STATUS_NONE %} circle-later
        {% elif r.draw_status == r.STATUS_DRAFT %} circle-later
        {% elif r.draw_status == r.STATUS_CONFIRMED %} circle-todo
        {% elif r.draw_status == r.STATUS_RELEASED %} circle-done
        {% else %} circle-todo{% endif %}"></i>{% trans "Display" %}
    </a>

    <a href="{% roundurl 'results-round-list' r %}" data-parent="#rh{{ r.id }}"
       class="list-group-item {% if results_nav and round == r %}active{% endif %}">
      <i data-feather="circle" class="circle-icon
        {% if r.completed %} circle-done
        {% elif r.draw_status == r.STATUS_CONFIRMED %}circle-todo
        {% elif r.draw_status == r.STATUS_RELEASED %}circle-todo
        {% else %} circle-later{% endif %}"></i>{% trans "Results" %}
    </a>

  </div>

</div>
